import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)
/**
 * 路由管理
 */
const routes = [
  {
    path: '*',
    redirect: '/pages/overview/index'
  },
  {
    path: '/pages/overview/index',
    component: () => import('@/pages/overview/index'),
    meta: {
      title: '概括'
    }
  },
  {
    path: '/pages/source/list',
    component: () => import('@/pages/source/list'),
    meta: {
      title: '渠道列表'
    }
  },
  {
    path: '/pages/source/report',
    component: () => import('@/pages/source/report'),
    meta: {
      title: '统计报表'
    }
  },
]

const router = new VueRouter({
  base: process.env.BASE_URL,
  routes
})

export default router